package com.yingxin.yxerp.module.dingtalk.entity.enums;

public enum WeComMarriageStatus {

    married(1, "已婚"),
    unmarried(2, "未婚"),
    divorced(3, "离异"),
    widowed(6, "丧偶"),
    other(4, "其他"),
    ;

    private Integer status;

    private String statusName;

    WeComMarriageStatus(Integer status, String statusName) {
        this.status = status;
        this.statusName = statusName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public static WeComMarriageStatus getEnum(Integer status) {
        if( status == null ){
            return null;
        }
        for (WeComMarriageStatus i : WeComMarriageStatus.values()) {
            if ( i.getStatus() == status ) {
                return i;
            }
        }
        return null;
    }

}
